import request from '@/utils/request'

//统一字典下拉框查询
export function adminDict(params) {
    return request({
        url: `common/v1/adminDict`,
        params
    })
}

//发售日历列表
export function calendarList(params) {
    return request({
        url: `/kyy/sale/calendar/list`,
        method: 'get',
        params
    })
}
//卡优优快讯评论列表
export function newsCommentList(params) {
    return request({
        url: `/kyy/news/v1/comment/list`,
        method: 'get',
        params
    })
}
// 中台 显示-隐藏 快讯评论
export function changeStatus(id) {
    return request({
        url: `/kyy/news/v1/comment/changeStatus/${id}`,
        method: 'put',
        
    })
}
//中台 显示-隐藏 发售日历
export function listChangeStatus(id) {
    return request({
        url: `/kyy/sale/calendar/changeStatus/${id}`,
        method: 'put',
    })
}
//删除发售日历
export function deleteCalendar(id) {
    return request({
        url: `/kyy/sale/calendar/${id}`,
        method: 'DELETE',
    })
}

//新增发售日历
export function addCalendar(data) {
    return request({
      url: '/kyy/sale/calendar',
      method: 'post',
      data
    })
}

//编辑发售日历
export function editCalendar(data) {
    return request({
      url: '/kyy/sale/calendar',
      method: 'put',
      data
    })
}
//获取发售日历详情
export function calendarDetail(id) {
    return request({
        url: `/kyy/sale/calendar/getInfo/${id}`,
        method: 'get',
    })
}
// 历史价格列表
export function historyList(params) {
    return request({
        url: `/kyy/sale/calendar/history/price/list`,
        method: 'get',
        params
    })
}
//新增历史价格
export function addHistory(data) {
    return request({
      url: '/kyy/sale/calendar/history/price/add',
      method: 'post',
      data
    })
}
//删除历史价格
export function deletehistory(id) {
    return request({
        url: `/kyy/sale/calendar/history/price/${id}`,
        method: 'DELETE',
    })
}
